import Vue from 'vue';
import Element from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
import '../static/css/index.css'
// 这里是修改下message的顶部偏移量
const $message = options=>{
  return Element.Message({
    ...options,
    offset:80,
    center:true
  });
}
['success','warning','info','error'].forEach(type=>{
  $message[type] = options=>{
    if (typeof  options === 'string'){
      options = {
        message:options,
        offset:80,
        center:true,
      };
    }
    options.type=type;
    return Element.Message(options);
  }
});
Vue.prototype.$myMessage = $message;
Vue.use(Element, { size: 'small', zIndex: 3000,offset: 80 });

